﻿using System;
using Dexter.Domain.Model;
using Dexter.Domain.Results;

namespace Dexter.Services {
	public interface IContactService {
		void SendMessage ( InboxMessage message );

		///<summary>
		///	Return a list of <see cref="InboxMessage"/> sorted by creation date.
		///</summary>
		///<param name = "pageIndex">Index of the page (0 based).</param>
		///<param name = "pageSize">The number of items to retrieve.</param>
		///<returns>An concrete implementation of <see cref="IPagedResult{T}"/>. The result will never be null.</returns>
		///<exception cref="ArgumentOutOfRangeException"> If <paramref name="pageIndex"/> is lesser than 0.</exception>
		///<exception cref="ArgumentOutOfRangeException"> If <paramref name="pageSize"/> is lesser than 1.</exception>
		IPagedResult<InboxMessage> GetList ( int pageIndex, int pageSize );

		///<summary>
		///	Return a list of <see cref="InboxMessage"/> sorted by creation date.
		///</summary>
		///<param name = "pageIndex">Index of the page (0 based).</param>
		///<param name = "pageSize">The number of items to retrieve.</param>
		/// <param name = "enableTracking">if set to <c>true</c> the tracking system of the return object will be enable.</param>
		///<returns>An concrete implementation of <see cref="IPagedResult{T}"/>. The result will never be null.</returns>
		///<exception cref="ArgumentOutOfRangeException"> If <paramref name="pageIndex"/> is lesser than 0.</exception>
		///<exception cref="ArgumentOutOfRangeException"> If <paramref name="pageSize"/> is lesser than 1.</exception>
		IPagedResult<InboxMessage> GetList ( int pageIndex, int pageSize, bool enableTracking );
	}
}